<?php
    
    include_once '../clases/Polla.php';
    
    $tc = $_REQUEST['tc'];
    
    if($tc == 1){
        
        $pol = new Polla("", "", "", "", "", "", "");
        $pol->mostrarPolla();
        
    }else if($tc == 2){
        
        $oid = $_REQUEST['oidp'];
        $res1 = $_REQUEST['res1'];
        $res2 = $_REQUEST['res2'];
        
        $pol = new Polla("", $res1, $res2, "", $oid, "", "");
        $pol->insertarPolla();
        
    }else if($tc == 3){
        
        $oidp = $_REQUEST['oidp'];
        $res1 = $_REQUEST['res1'];
        $res2 = $_REQUEST['res2'];
        
        $pol = new Polla($oidp, $res1, $res2, "", "", "", "");
        $pol->editarPolla();
        
    }else if($tc == 4){
        
        $progra = $_REQUEST['oidpro'];
        
        $pol = new Polla("", "", "", "", $progra, "", "");
        $pol->mostrarPolla2();
        
    }else if($tc == 5){
        
        $usuoid = $_REQUEST['usuoid'];
        
        $pol = new Polla("", "", "", $usuoid, "", "", "");
        $pol->mostrarPolla3();
        
    }

?>
